package org.jdemo.feature.oom;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * OOMHeapTest
 *
 * @author longlin(longlin@cyou-inc.com)
 * @date 202014/4/28
 * @since V1.0
 */
public class OOMHeapTest {
    public static void main(String[] args) {
        oom();
    }

    private static void oom() {
        Map<String, Pilot> map = new HashMap<String, Pilot>();
        Object[] array = new Object[10000000];
        for (int i = 0; i < 10000000; i++) {
            String d = new Date().toString();
            Pilot p = new Pilot(d, i);
            map.put(i + "rosen jiang", p);
            array[i] = p;
        }
    }
}
